import { createRouter, createWebHashHistory } from 'vue-router'
import IndexComponent from "../components/IndexComponent.vue"
import PostComponent from "../components/PostComponent.vue"
import ActivityComponent from '../components/ActivityComponent.vue'
import NoticeComponent from '../components/NoticeComponent.vue'
import SurveyComponent from '../components/SurveyComponent.vue'
import OwnComponent from '../components/OwnComponent.vue'

const routes = [
  {
    path: '/',
    name: 'index',
    component: IndexComponent
  },
  {
    path: '/post',
    name: 'post',
    component: PostComponent
  },
  {
    path: '/activity',
    name: 'activity',
    component: ActivityComponent
  },
  {
    path: '/notice',
    name: 'notice',
    component: NoticeComponent
  },
  {
    path: '/survey',
    name: 'survey',
    component: SurveyComponent
  },
  {
    path: '/own',
    name: 'own',
    component: OwnComponent
  }
  // {
  //   path: '/about',
  //   name: 'about',
  // route level code-splitting
  // this generates a separate chunk (about.[hash].js) for this route
  // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
